﻿@using Abp.Application.Services.Dto;
@using FwProject.Distribution
@using FwProject.Distribution.Dto.Statistics
@using X.PagedList
@model QuarterlySummaryDto

@section styles{
    <link href="~/Theme/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="~/Theme/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
    <style type="text/css">
        .input-group[class*=col-] {
            padding: 0 15px;
        }
    </style>
}
<div class="row">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="wrapper wrapper-content animated fadeInRight">
                    <div class="ibox-content m-b-sm border-bottom">
                        <div class="p-xs">
                            <div class="pull-left m-r-md">
                                <i class="fa fa-globe text-navy mid-icon"></i>
                            </div>
                            <h2>季度汇总</h2>
                            @*<span>你可以自由选择你感兴趣的话题。</span>*@
                        </div>
                    </div>
                    <div class="ibox-content forum-container">
                        <div class="forum-title">
                            <h3> 最近三个月的 <span class="text-navy"> 配送 </span><span class="text-warning"> 应收 </span><span class="text-success"> 已收 </span></h3>
                        </div>
                        @foreach (var item in Model.Summarys)
                        {
                            <div class="forum-item active" style="cursor:pointer;" onclick="top.window.openTab(10012,'@item.Month 月-详情','@Url.Action("QuarterlyDetailsM",new { time=item.Year+"-"+item.Month })');">
                                <div class="row">
                                    <div class="col-sm-9">
                                        <div class="forum-icon">
                                            <i class="fa fa-calendar"></i>
                                        </div>
                                        <a class="forum-item-title">@item.Month 月</a>
                                        <div class="forum-sub-title">@item.Year</div>
                                    </div>
                                    <div class="col-sm-1 forum-info">
                                        <span class="views-number text-navy">
                                            @item.Distribution 件
                                        </span>
                                        <div>
                                            <small>配送</small>
                                        </div>
                                    </div>
                                    <div class="col-sm-1 forum-info">
                                        <span class="views-number text-warning">
                                            ￥@item.Receivable
                                        </span>
                                        <div>
                                            <small>应收</small>
                                        </div>
                                    </div>
                                    <div class="col-sm-1 forum-info">
                                        <span class="views-number text-success">
                                            ￥@item.Already
                                        </span>
                                        <div>
                                            <small>已收</small>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        }

                        <div class="forum-title">
                            <div class="pull-right forum-desc">
                                @*<samll>总贴子数：17,800,600</samll>*@
                            </div>
                            <h3>今日汇总</h3>
                        </div>
                        <div class="forum-item">
                            <div class="row" style="cursor:pointer;" onclick="top.window.openTab(10013,'@DateTime.Now.ToString("yyyy-MM-dd") -详情','@Url.Action("QuarterlyDetailsD",new { time=DateTime.Now.ToString("yyyy-MM-dd"),type="Distribution" })');">
                                <div class="col-sm-9">
                                    <div class="forum-icon">
                                        <i class="fa fa-ambulance"></i>
                                    </div>
                                    <a class="forum-item-title">
                                        今日配送
                                    </a>
                                    <div class="forum-sub-title">今日所有配送件数</div>
                                </div>
                                <div class="col-sm-3 forum-info">
                                    <span class="views-number">
                                        @(Model.TodaySummary != null ? Model.TodaySummary.TodayDistribution : 0) 件
                                    </span>
                                    <div>
                                        <small>@DateTime.Now.ToString("yyyy-MM-dd")</small>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="forum-item">
                            <div class="row" style="cursor:pointer;" onclick="top.window.openTab(10014,'@DateTime.Now.ToString("yyyy-MM-dd") -详情','@Url.Action("QuarterlyDetailsD",new { time=DateTime.Now.ToString("yyyy-MM-dd"),type="Distribution" })');">
                                <div class="col-sm-9">
                                    <div class="forum-icon">
                                        <i class="fa fa-bolt"></i>
                                    </div>
                                    <a class="forum-item-title">今日回收</a>
                                    <div class="forum-sub-title">今日所有回收件数</div>
                                </div>
                                <div class="col-sm-3 forum-info">
                                    <span class="views-number">
                                        @(Model.TodaySummary != null ? Model.TodaySummary.TodayRecycling : 0) 件
                                    </span>
                                    <div>
                                        <small>@DateTime.Now.ToString("yyyy-MM-dd")</small>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="forum-item">
                            <div class="row" style="cursor:pointer;" onclick="top.window.openTab(10015,'@DateTime.Now.ToString("yyyy-MM-dd") -详情','@Url.Action("QuarterlyDetailsD",new { time=DateTime.Now.ToString("yyyy-MM-dd"),type="Receipt" })');">
                                <div class="col-sm-9">
                                    <div class="forum-icon">
                                        <i class="fa fa-bookmark"></i>
                                    </div>
                                    <a class="forum-item-title">今日收款</a>
                                    <div class="forum-sub-title">今日所有收款金额</div>
                                </div>
                                <div class="col-sm-3 forum-info">
                                    <span class="views-number">
                                        ￥ @(Model.TodaySummary != null ? Model.TodaySummary.TodayReceipt : 0m)
                                    </span>
                                    <div>
                                        <small>@DateTime.Now.ToString("yyyy-MM-dd")</small>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

